home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7313 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.1 KB  |  59 lines

  1. Path: logica.co.uk!usenet
  2. From: Kevin Thomas <thomask@logica.com>
  3. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.tools.mfc
  4. Subject: Re: Getting functions out of libraries to work
  5. Date: Thu, 22 Feb 1996 17:34:26 +0000
  6. Organization: Logica UK Ltd.
  7. Message-ID: <312CA922.65CB@logica.com>
  8. References: <312BBC29.6772@uni.massey.ac.nz> <4ghlc2$f9o@news.dax.net>
  9. NNTP-Posting-Host: 158.234.77.222
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
  14.  
  15. Nils Andreas Thommesen wrote:
  16. > In article <312BBC29.6772@uni.massey.ac.nz>,
  17. >    Nigel.Ramsay.1@massey.ac.nz wrote:
  18. > >Hi,
  19. > >
  20. > >I am trying to get some functions out of a library to work. The problem
  21. > >is that I keep getting an "unresolved external" error whenever I try to
  22. > >call the functions.
  23. > >
  24. > >The funny thing is that it works fine when I compile under just C.
  25. > >
  26. > >I am using Microsoft Visual C++ 1.0, running under Windows 95.
  27. > >
  28. > >Please help me.
  29. > >
  30. > >***** All email replies to: Nigel.Ramsay.1@uni.massey.ac.nz *****
  31. > >                 [not the reply-to address]
  32. > >Thanks,
  33. > >
  34. > >Nigel Ramsay.
  35. > Are you linking the library implicitly or explicitly?
  36. > Implicit: just specify it in the Project-edit-dialog
  37. > Explicit: a lot more trouble, use LoadLibrary(), then follow the help-pages.
  38. > "Unresolved external" means the compiler doesn't know about the function. Have
  39. > you included all the necessary headers?
  40. > Nils Andreas Thommesen
  41. > -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
  42. > Email: Nils.Thommesen@kvatro.no
  43. > Work : Kvatro-Notis, Pirsenteret, N-7005 Trondheim;  +47 73 545 722
  44. > Home : E.B Schieldropsv. 9-24,7033 Trondheim,Norway; +47 73 8888 93
  45. > Fax  : +47 73 545 750               |  I'm left-handed, left-eyed,
  46. > WWW  : http://www.kvatro.no/~nat    |  left-footed but not left
  47. >        http://www.kvatro.no/notis   |  behind!Have you remembered to put the header files for the library functions 
  48. inside an extern "C"?
  49.  
  50. e.g. suppose your library functions are declared in "mylib.h":
  51.  
  52. extern "C" {
  53.     #include "mylib.h"
  54. }
  55.